#!/usr/bin/env python3
# -*- coding:utf-8 -*-

import threading

def abc(a):
    print(a)
    return a * 2

if __name__ == '__main__':

    try:

        threads = []
        for i in range(1, 31):
            threads.append(threading.Thread(target=abc, name="爬虫{}号".format(i), args=(i,)))

        for thread in threads:
            print("正在启动: {}...".format(thread.name))
            thread.start()
            thread.join()
    except KeyboardInterrupt:
        print("正在终止...")